﻿@model AuditModel.ScorePercentage

@{
    ViewBag.Title = AuditResources.UI.PageTitle;
    Layout = "~/Views/Shared/SubjectAdmin/_SubjectAdminLayout.cshtml";
}
<h2>@AuditResources.ScorePercentage.ObjectName</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@if ((bool)ViewBag.CanEdit)
{
    <h3>注意：评分权重和不能大于100. </h3>
    using (Html.BeginForm())
    {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend></legend>
        @Html.HiddenFor(model => model.SubjectID)
        @Html.HiddenFor(model => model.AnnualEventID)
            

        <div class="editor-label">
            @AuditResources.ScorePercentage.PercentofMaterial
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PercentofMaterial)
            @Html.ValidationMessageFor(model => model.PercentofMaterial)
        </div>
        
        <div class="editor-label">
            @AuditResources.ScorePercentage.PercentofInstruction
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PercentofInstruction)
            @Html.ValidationMessageFor(model => model.PercentofInstruction)
        </div>

        <div class="editor-label">
            @AuditResources.ScorePercentage.PercentofDefense
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PercentofDefense)
            @Html.ValidationMessageFor(model => model.PercentofDefense)
        </div>

        <div class="editor-label">
            @AuditResources.ScorePercentage.PercentofOthers
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PercentofOthers)
            @Html.ValidationMessageFor(model => model.PercentofOthers)
        </div>
        
        <h3 class="clear">
        <br />
        <br />
        @Html.ValidationMessageFor(model => model.SubjectID)
        </h3>
    </fieldset>
    <div>
<input type="submit" value="@AuditResources.UI.Save" /> | @Html.ActionLink(@AuditResources.UI.BackToList, "Index", null, new { @class = "button" })
</div>
    }
}
else
{
    <h3 class="error">已有评委进行评分，不能修改评分权重。如果确实需要修改评分权重，请先删除所有的评委评分数据。@Html.ActionLink("查看评分情况", "Scores", "SubjectAdmin", null, new { @class = "button" })</h3>
    <fieldset>
        <legend></legend>
        @Html.HiddenFor(model => model.SubjectID)
        @Html.HiddenFor(model => model.AnnualEventID)
            

        <div class="display-label">
            @AuditResources.ScorePercentage.PercentofMaterial
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.PercentofMaterial)
        </div>
        
        <div class="display-label">
            @AuditResources.ScorePercentage.PercentofInstruction
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.PercentofInstruction)
        </div>

        <div class="display-label">
            @AuditResources.ScorePercentage.PercentofDefense
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.PercentofDefense)
        </div>

        <div class="display-label">
            @AuditResources.ScorePercentage.PercentofOthers
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.PercentofOthers)
        </div>
    </fieldset>
}


